# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=invoke-dosfuscation
pkgver=7.6260f5b
pkgrel=1
pkgdesc='Cmd.exe Command Obfuscation Generator & Detection Test Harness.'
arch=('any')
groups=('blackarch' 'blackarch-automation')
url='https://github.com/danielbohannon/Invoke-DOSfuscation'
license=('Apache')
makedepends=('git')
source=("$pkgname::git+https://github.com/danielbohannon/Invoke-DOSfuscation")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

package() {
  cd $pkgname

  install -Dm 644 -t "$pkgdir/usr/share/windows/$pkgname/" *.ps*

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
  install -Dm 644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE

  rm README.md LICENSE *.ps*

  cp -a --no-preserve=ownership * "$pkgdir/usr/share/windows/$pkgname/"
}

